package com.lwz;

public class Ex {
	
	public static void main(String[] args) {
		try {
			abd();
		} catch (Exception e) {
			System.out.println("抓取到对应的abc异常信息为:"+e.getMessage());
			e.printStackTrace();
		}
	}
	
	public static int abc() throws Exception{
		int i = 0,c =1;
		int b = 1/0;
		int a =  4;
		System.out.println("当前结果b为:a为"+a);
		return a;
	}
	
	public static int abd() {
		int i = 0,c =1;
		try{
			int b = 1/0;
		}catch(Exception e){
			System.out.println("123");
		}
		
		int a =  4;
		System.out.println("当前结果b为:a为"+a);
		return a;
	}

}
